package com.zs.blog.converter;

import com.zs.blog.model.dto.RoleEditDTO;
import com.zs.blog.model.dto.RoleEditStatusDTO;
import com.zs.blog.model.dto.RoleListDTO;
import com.zs.blog.model.entity.Role;
import com.zs.blog.model.vo.RoleListVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @Title: RoleConverter
 * @Author zs
 * @Package com.zs.blog.converter
 * @Date 2025/6/25 22:31
 * @description: 角色属性转换器
 */
@Mapper(componentModel = "spring")
public interface RoleConverter {
    RoleConverter INSTANCE = Mappers.getMapper(RoleConverter.class);
    
    List<RoleListVO> RoleList2RoleListVO(List<Role> roles);

    Role roleEditDTO2Role(RoleEditDTO roleEditDTO);

    Role roleEditStatusDTO2Role(RoleEditStatusDTO roleEditStatusDTO);

    RoleListVO roleListDTO2RoleListVO(RoleListDTO roleListDTO);
}
